package com.neuedu.hrbu.sca.controller;

import com.neuedu.hrbu.sca.entity.Product;
import com.neuedu.hrbu.sca.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 作者: 张金山
 * 创建时间：2025/1/26 17:36   星期日
 * 描述：
 * 项目: spring-cloud-parent - com.neuedu.hrbu.sca
 * 作者的博客:  https://blog.fulfill.com.cn
 */

@RestController
@RequestMapping("/product")
public class ProductController {
    @Autowired
    private ProductService productService;

    @RequestMapping("/get/{pid}")
    public Product getById(@PathVariable("pid") Integer pid){
        return productService.getById(pid) ;
    }
}
